﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UIT.Controls;

namespace UIT.Style
{
    public class Style
    {
        public Style()
        {
            Text = new TextStyle();
        }

        public TextStyle Text { get; set; }

        public Unit Height { get; set; }
        public Unit Width { get; set; }

        public Brush Background { get; set; }

        public Thickness Margin { get; set; }

        public static Thickness GetMargin(IDrawableControl control)
        {
            return control.Style.Margin;
        }

        public static void SetMargin(IDrawableControl control, Thickness value)
        {
            control.Style.Margin = value;
        }


        public static Unit GetHeight(IDrawableControl control)
        {
            return control.Style.Height;
        }

        public static void SetHeight(IDrawableControl control, Unit value)
        {
            control.Style.Height = value;
        }

        public static Unit GetWidth(IDrawableControl control)
        {
            return control.Style.Width;
        }

        public static void SetWidth(IDrawableControl control, Unit value)
        {
            control.Style.Width = value;
        }

        public static Brush GetBackground(IDrawableControl control)
        {
            return control.Style.Background;
        }

        public static void SetBackground(IDrawableControl control, Brush value)
        {
            control.Style.Background = value;
        }
    }
}
